{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ name }}'s resume</title>
    <link rel="stylesheet" href="{% static 'resume/css/index.css' %}">
    <script src="{% static 'resume/js/jquery.js' %}"></script>
    <script src="{% static 'resume/js/index.js' %}"></script>
    <script>
        const g_upload_img_url = "{% url 'blog:upload_img' %}";
        const g_static_img_url = "{% static 'uploads/'%}";
        // const g_user_data = {{ data }}
        // console.log({{ internship|safe }}[0]["describe"]);
    </script>
</head>
<body>
<div class="resume-head">
    <span class="user">{{ user|safe }}</span>
    <div class="head-info-box">
        <div class="info-base">
            <div class="bottom-info">
                <div class="certificate bottom-info-item">
                    <span class="entry-title">{{ certificate_type }}</span>
                    <span class="entry-data">{{ certificate_id }}</span>
                </div>
                <div class="certificate bottom-info-item">
                    <span class="entry-title">性别</span>
                    <span class="entry-data">{{ gender }}</span>
                </div>
                <div class="age bottom-info-item">
                    <span class="entry-title">年龄（岁）</span>
                    <span class="entry-data">{{ age }}</span>
                </div>
                <div class="phone bottom-info-item">
                    <span class="entry-title">电联</span>
                    <span class="entry-data">{{ phone }}</span>
                </div>
                <div class="nationality bottom-info-item">
                    <span class="entry-title">国籍</span>
                    <span class="entry-data">{{ nationality }}</span>
                </div>
                {% for contact in contacts %}
                    <div class="contacts bottom-info-item">
                        <span class="entry-title">{{ contact.title }}</span>
                        <span class="entry-data">{{ contact.data }}</span>
                    </div>
                {% endfor %}
                <div class="emails bottom-info-item">
                    <span class="entry-title">邮箱</span>
                    {% for email in emails %}
                        <span class="entry-data">{{ email|safe }}</span>
                    {% endfor %}
                </div>
            </div>
            {% if pic_url %}
                <div class="head-img-box">
                    <img src="{{ pic_url|safe }}" alt="" class="head-img">
                </div>
            {% else %}
                <div class="head-img-box img-not-exit">
                    <img src="" alt="" class="head-img ">
                </div>
            {% endif %}
            <div class="head-img-bg-holder"></div>
        </div>
    </div>

</div>
<main class="resume-body">
    <div class="edu-info item-box">
        <div class="item-top-title">
            教育经历
        </div>
        {% for edu in edu_info %}
            <div class="edu-info">
                <div class="time-through edu-info-item">
                    <span class="entry-data">{{ edu.time_through }}</span>
                    <div class="line-holder"></div>
                    <div class="rank-grade edu-info-item-sub">
                        <span class="entry-title">成绩排名</span>
                        <span class="entry-data">{{ edu.rank_grade }}</span>
                    </div>
                </div>
                <div class="edu-info-body">
                    <div class="school-name edu-info-item">
                        <span class="entry-title">学校</span>
                        <span class="entry-data">{{ edu.school_name }}</span>
                    </div>
                    <div class="edu-grade edu-info-item">
                        <span class="entry-title">学历</span>
                        <span class="entry-data">{{ edu.edu_grade }}</span>
                    </div>
                    <div class="faculty edu-info-item">
                        <span class="entry-title">学院</span>
                        <span class="entry-data">{{ edu.faculty }}</span>
                    </div>
                    <div class="major edu-info-item">
                        <span class="entry-title">专业</span>
                        <span class="entry-data">{{ edu.major }}</span>
                    </div>
                </div>
            </div>
        {% endfor %}
    </div>
    <div class="intentions item-box">
        <span class="item-title">求职意向</span>
        <div class="data-box">
            <div class="data-title">岗位</div>
            {% for it in intentions.identity %}
                <span class="data"> {{ it }} </span>
            {% endfor %}
        </div>
        <div class="data-box">
            <div class="data-title">城市</div>
            {% for it in intentions.city %}
                <span class="data"> {{ it }} </span>
            {% endfor %}
        </div>
    </div>
    <div class="internship item-box">
        <span class="item-title">工作经历</span>
        {% for it in internship %}
            <div class="entry-box">
                <div class="time-through edu-info-item">
                    <span class="entry-data">{{ it.time_through }}</span>
                    <div class="line-holder"></div>
                </div>
            </div>
        {% endfor %}
    </div>
</main>
<form>
    {% csrf_token %}
    <input type="file" id="person_img">
    <input type="button" value="提交" id=btn class="submit_person_img">
</form>
</body>
</html>